<template>
  <div class="common-layout">
    <el-container>
      <el-aside class="aside"><Aside :data="data"></Aside></el-aside>
      <el-container>
        <el-header class="header"
          ><Header @fromBrother="getBrother"></Header
        ></el-header>
        <el-main class="main"><Main :data="data" /></el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup>
import Aside from "@/components/aside/Aside.vue";
import Header from "@/components/header/Header.vue";
import Main from "@/components/main/Main.vue";
import { ref } from "vue";
const data = ref(false);
const isSure = ref();

const getBrother = (val) => {
  data.value = val;
  // console.log(val)
};
// getBrother()
// watch(data, (val) => {
//   // console.log('data:'+val)
// })
// // isSure.value=data.value
// // watch()
// console.log('data:'+data.value)
// console.log(title.value)
defineExpose({
  data,
});
</script>

<style scoped>
.common-layout {
  /* min-width: 100vw;
  min-height: 100vh; */
  width: 100%;
  height: 1000px;
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  background-color: grey;
}
.header {
  height: 60px;
  /* background-color: darkcyan; */
}
/* 解决el-header的padding问题 */
.el-header.el-header.header {
  padding: 0 !important;
}
.aside {
  width: 200px;
  height: 100%;
  background-color: rgb(58, 64, 46);
  padding: 0 !important;
}
.main {
  width: 100%;
  height: 100%;
  /* background-color:burlywood; */
  overflow: hidden;
  padding: 0 !important;
}
</style>